|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Holds a stored key, and keeps track of caching and key expiry
Field Summary | |
---|---|
int |
Authority
Authority level of store |
double | CACHE_MAX |
int |
CACHE_RANGE
Number of nodes keys are cached over |
Naanou.Common.Search.IKey |
Data
Data |
Naanou.Common.KeyContainer |
Empty
Empty key |
long |
ExpireLength
How many minutes key will expire in |
long |
ExpireTime
Expiry time (ticks) |
Naanou.Common.Hash |
Id
Id for key to be stored under |
Naanou.Common.Hash |
InsertedBy
Who inserted the key |
long |
InsertTime
Insertion time (ticks) |
bool |
IsEmpty
Is key empty |
long |
LastCacheTime
Expiry time (ticks) |
long |
ReCacheTime
Time (ticks) when cached version of this key should be recached |
Constructor Summary | |
---|---|
KeyContainer(Naanou.Common.Search.IKey data, Naanou.Common.Hash id, Naanou.Common.Hash insertedBy, long expire, int authority) Constructor |
|
KeyContainer(bool empty) Empty constructor |
Method Summary | |
---|---|
void |
Added() Signals to key it has been added to storage. This will set the insert and expire times |
void |
Cached() Signals to key that it has been cached. This will reset caching times |
bool | Equals(object o) |
int | GetHashCode() |
bool |
IsExpired() Has the key expired |
bool |
RequiresCaching() Checks whether key needs to be cached |
string |
ToString() Gets a string representation of key |
Methods inherited from class System.Object |
---|
Finalize, GetType, MemberwiseClone |
Operator Summary | |
---|---|
bool | operator ==(Naanou.Common.KeyContainer x, Naanou.Common.KeyContainer y) |
bool | operator !=(Naanou.Common.KeyContainer x, Naanou.Common.KeyContainer y) |
Field Detail |
---|
public int Authority
Authority level of store
private double CACHE_MAX
public int CACHE_RANGE
Number of nodes keys are cached over
public Naanou.Common.Search.IKey Data
Data
public Naanou.Common.KeyContainer Empty
Empty key
public long ExpireLength
How many minutes key will expire in
private long ExpireTime
Expiry time (ticks)
public Naanou.Common.Hash Id
Id for key to be stored under
public Naanou.Common.Hash InsertedBy
Who inserted the key
private long InsertTime
Insertion time (ticks)
public bool IsEmpty
Is key empty
private long LastCacheTime
Expiry time (ticks)
private long ReCacheTime
Time (ticks) when cached version of this key should be recached
Constructor Detail |
---|
public KeyContainer(Naanou.Common.Search.IKey data, Naanou.Common.Hash id, Naanou.Common.Hash insertedBy, long expire, int authority)
Constructor
Parameters:
data
- Dataid
- Id for key to be stored underinsertedBy
- Inserted by (0 for anon)expire
- In how many minutes should key expireauthority
- Authority (0 top-level)System.ArgumentNullException
- A required parameter is nullprivate KeyContainer(bool empty)
Empty constructor
Parameters:
empty
- Good for nothingMethod Detail |
---|
public void Added()
Signals to key it has been added to storage. This will set the insert and expire times
public void Cached()
Signals to key that it has been cached. This will reset caching times
public bool Equals(object o)
public int GetHashCode()
public bool IsExpired()
Has the key expired
Returns:
public bool RequiresCaching()
Checks whether key needs to be cached
Returns:
public string ToString()
Gets a string representation of key
Returns:
Operator Detail |
---|
public bool operator ==(Naanou.Common.KeyContainer x, Naanou.Common.KeyContainer y)
public bool operator !=(Naanou.Common.KeyContainer x, Naanou.Common.KeyContainer y)
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |